//
//  jingpinCollCell.m
//  Hand-held_kitchen
//
//  Created by 张张烨 on 16/1/20.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "jingpinCollCell.h"

@implementation jingpinCollCell
- (void)dealloc
{
    [_tupian release];
    [_touxiang release];
    [_shijian  release];
    [_nicheng release];
    [super dealloc];
}
-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.tupian = [[UIImageView alloc]init];
        [self.contentView addSubview:_tupian];
        _tupian.layer.cornerRadius = (189/2) * GAO;
        _tupian.clipsToBounds = YES;
        
        [_tupian release];
        
        self.touxiang  =[[UIImageView alloc]init];
        [self.contentView addSubview:_touxiang];
        _touxiang.layer.cornerRadius = 25 * GAO;
        _touxiang.clipsToBounds = YES;
        [_touxiang release];
        
        self.nicheng =  [[UILabel alloc]init];
        [self.contentView addSubview:_nicheng];
        _nicheng.font = [UIFont systemFontOfSize:14* KUAN];
        //        _nicheng.textColor = [UIColor grayColor];
        [_nicheng release];
        
        self.shijian = [[UILabel alloc]init];
        [self.contentView addSubview:_shijian];
        _shijian.font = [UIFont systemFontOfSize:12* KUAN];
        _shijian.textColor = [UIColor grayColor];
        [_shijian release];
    }
    return self;
}

-(void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    _tupian.frame =CGRectMake(0, 0,189 * GAO, 189 *GAO);
   // layoutAttributes.bounds;
    
    _touxiang.frame = CGRectMake(5 * KUAN, 194 *GAO, 50 * GAO, 50 * GAO);
    _nicheng.frame = CGRectMake(60 * KUAN, 188 * GAO, 100 * KUAN, 40 * GAO);
    _shijian.frame = CGRectMake(60 * KUAN, (185+40)*GAO, 80 * KUAN, 30 * GAO);
}


@end
